home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / misc / gms_e.lha / GMSDev / EModules / graphics / blitter.e next >
Text File  |  1997-09-15  |  6KB  |  173 lines

  1. /*
  2. **  $VER: blitter.e V0.8B
  3. **
  4. **  Blitter Object Definitions.
  5. **
  6. **  (C) Copyright 1996-1997 DreamWorld Productions.
  7. **      All Rights Reserved
  8. */
  9.  
  10. OPT MODULE
  11. OPT EXPORT
  12. OPT PREPROCESS
  13.  
  14. MODULE 'gms/dpkernel','graphics/pictures','graphics/screens','system/register'
  15.  
  16. ->***************************************************************************
  17. ->* Bitmap Object. 
  18.  
  19. CONST BMPVERSION  = 1,
  20.       TAGS_BITMAP = $FFFB0000 OR ID_BITMAP
  21.  
  22. OBJECT bitmap
  23.   head[1]     :ARRAY OF head
  24.   data        :LONG   /* Pointer to bitmap data area */
  25.   width       :INT    /* Width */
  26.   bytewidth   :INT    /* ByteWidth */
  27.   height      :INT    /* Height */
  28.   scrtype     :INT    /* Screen type */
  29.   planes      :INT    /* Amount of planes */
  30.   linemodulo  :LONG   /* Line differential */
  31.   planemodulo :LONG   /* Plane differential */
  32.   owner       :LONG   /* Bitmap owner */
  33.   restore     :LONG   /* Restore list for this bitmap, if any */
  34.   size        :LONG   /* Total size of the bitmap in bytes */
  35. ENDOBJECT
  36.  
  37. /***************************************************************************
  38. ** Bob Object.
  39. */
  40.  
  41. CONST BOBVERSION = 1,
  42.       TAGS_BOB   = $FFFB0000 OR ID_BOB
  43.  
  44. OBJECT bob
  45.    head[1]      :ARRAY OF head
  46.    gfxdata      :LONG          -> Pointer to base of BOB graphics.
  47.    maskdata     :LONG          -> Pointer to base of BOB masks.
  48.    frame        :INT           -> Current frame.
  49.    framelist    :LONG          -> Pointer to frame list.
  50.    srcwidth     :INT           -> Modulo (skip in source) in bytes.
  51.    width        :INT           -> Width in pixels.
  52.    bytewidth    :INT           -> Width in bytes.
  53.    height       :INT           -> Height in pixels.
  54.    xcoord       :INT           -> To X pixel.
  55.    ycoord       :INT           -> To Y pixel.
  56.    clipLX       :INT           -> Left X border in bytes (0/8)
  57.    clipTY       :INT           -> Top Y border (0)
  58.    clipRX       :INT           -> Right X border in bytes (320/8)
  59.    clipBY       :INT           -> Bottom Y border (256)
  60.    fplane       :INT           -> 1st Plane to blit to (planar only)
  61.    planes       :INT           -> Amount of planes
  62.    planesize    :LONG          -> Size Of Plane Source (planar only)
  63.    attrib       :LONG          -> Attributes like CLIP and MASK.
  64.    picturetags  :LONG          -> Pointer to a picture struct (bob origin).
  65.    empty        :INT           -> Reserved
  66.    srcmaskwidth :INT
  67.    picture      :PTR TO picture
  68.    directlist   :LONG
  69.    amtframes    :INT
  70.    screen       :PTR TO screen
  71.    bitmap       :PTR TO bitmap
  72.    buffers      :INT
  73.    maskcoords   :PTR TO framelist
  74.    propwidth    :INT
  75.    propheight   :INT
  76.    directmasks  :LONG
  77. ENDOBJECT
  78.  
  79. CONST BBA_GfxData      = TAPTR OR 12,
  80.       BBA_MaskData     = TAPTR OR 16,
  81.       BBA_Frame        = TWORD OR 20,
  82.       BBA_FrameList    = TAPTR OR 22,
  83.       BBA_SrcWidth     = TWORD OR 26,
  84.       BBA_Width        = TWORD OR 28,
  85.       BBA_ByteWidth    = TWORD OR 30,
  86.       BBA_Height       = TWORD OR 32,
  87.       BBA_XCoord       = TWORD OR 34,
  88.       BBA_YCoord       = TWORD OR 36,
  89.       BBA_ClipLX       = TWORD OR 38,
  90.       BBA_ClipTY       = TWORD OR 40,
  91.       BBA_ClipRX       = TWORD OR 42,
  92.       BBA_ClipBY       = TWORD OR 44,
  93.       BBA_FPlane       = TWORD OR 46,
  94.       BBA_Planes       = TWORD OR 48,
  95.       BBA_PlaneSize    = TLONG OR 50,
  96.       BBA_Attrib       = TLONG OR 54,
  97.       BBA_PictureTags  = TAPTR OR 58,
  98.       BBA_Empty        = TWORD OR 62,
  99.       BBA_SrcMaskWidth = TWORD OR 64,
  100.       BBA_Picture      = TAPTR OR 66,
  101.       BBA_DirectList   = TAPTR OR 70,
  102.       BBA_AmtFrames    = TWORD OR 74,
  103.       BBA_Screen       = TAPTR OR 76,
  104.       BBA_Bitmap       = TAPTR OR 80,
  105.       BBA_Buffers      = TWORD OR 84,
  106.       BBA_MaskCoords   = TAPTR OR 86,
  107.       BBA_PropWidth    = TWORD OR 90,
  108.       BBA_PropHeight   = TWORD OR 92,
  109.       BBA_DirectMasks  = TAPTR OR 94
  110.  
  111. /***********************************************************************************
  112. ** Multple Bob object.
  113. */
  114.  
  115. CONST MBOBVERSION = 1,
  116.       TAGS_MBOB   = $FFFB0000 OR ID_MBOB
  117.  
  118. OBJECT mbob
  119.    head[1]      :ARRAY OF head  -> Standard header.
  120.    gfxdata      :LONG           -> Pointer to base of BOB graphics.
  121.    maskdata     :LONG           -> Pointer to base of BOB masks.
  122.    amtentries   :INT            -> Amount of entries.
  123.    framelist    :LONG           -> Pointer to frame list.
  124.    srcwidth     :INT            -> Modulo (skip in source) in bytes.
  125.    width        :INT            -> Width in pixels.
  126.    bytewidth    :INT            -> Width in bytes.
  127.    height       :INT            -> Height in pixels.
  128.    entrylist    :LONG           -> Pointer to entry list.
  129.    clipLX       :INT            -> Left X border in bytes (0/8)
  130.    clipTY       :INT            -> Top Y border (0)
  131.    clipRX       :INT            -> Right X border in bytes (320/8)
  132.    clipBY       :INT            -> Bottom Y border (256)
  133.    fplane       :INT            -> 1st Plane to blit to (planar only)
  134.    planes       :INT            -> Amount of planes
  135.    planesize    :LONG           -> Size Of Plane Source (planar only)
  136.    attrib       :LONG           -> Attributes like CLIP and MASK.
  137.    picturetags  :LONG           -> Pointer to a picture struct (bob origin).
  138.    entrysize    :INT            -> Size of each entry in the list.
  139.    srcmaskwidth :INT            -> 
  140.    picture      :PTR TO picture ->
  141.    directlist   :LONG           -> 
  142.    amtframes    :INT            -> 
  143.    screen       :PTR TO screen  ->
  144.    bitmap       :LONG           -> Pointer to Bob's Bitmap.
  145.    buffers      :INT            -> Amount of buffers in dest screen.
  146.    maskcoords   :LONG           -> Pointer to frame list for masks.
  147.    propwidth    :INT            -> Expected width of source picture.
  148.    propheight   :INT            -> Expected height of source picture.
  149.    directmasks  :LONG           -> 
  150. ENDOBJECT
  151.  
  152. OBJECT framelist
  153.    gfx_xcoord :INT
  154.    gfx_ycoord :INT
  155.    msk_xcoord :INT
  156.    msk_ycoord :INT
  157. ENDOBJECT
  158.  
  159. CONST CLIP      = $00000001,
  160.       MASK      = $00000002,
  161.       STILL     = $00000004,
  162.       CLEAR     = $00000008,
  163.       RESTORE   = $00000010,
  164.       FILLMASK  = $00000040,
  165.       GENMASK   = $00000082,
  166.       GENMASKS  = $00000082,
  167.       CLRMASK   = $00000100,
  168.       CLRNOMASK = $00000000
  169.  
  170. CONST SKIPIMAGE = 32000,
  171.       SKIPPIXEL = -32000
  172.  
  173.